@extends('admin.layout.layout')
@section('title','用户修改')
                       

    
     @section('con')
        <div id="page-wrapper">
            <div class="row">
                <div ass="col-lg-12">
                    <h1 class="page-header">
                        
                    用户修改
                    


                    </h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            
            <div class="row">
                
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            用户修改
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6 col-md-offset-3">
        
                             @if (count($errors) > 0)
                                 <div class="alert alert-danger">
                                   <ul>
                                  @foreach ($errors->all() as $error)
                                  <li>{{ $error }}</li>
                                  @endforeach
                                  </ul>
                                  </div>
                             @endif
                                    <form role="form" action='{{url("/admin/user/doedit")}}' method='post' enctype='multipart/form-data'>
                                        <div class="form-group">
                                            <label>用户名</label>
                                            <input class="form-control" type='text' name='uname' value="{{$user->uname}}">
                                            
                                        </div>
                                        
                                        <div class="form-group">
                                            <label>性别</label>
                                            <div class="radio" style='display:inline-block'>
                                                <label>
                                                    <input type="radio"  @if($user->sex =='m') { checked } @endif name='sex' value='m'>男
                                                </label>
                                            </div>
                                            <div class="radio" style='display:inline-block'>
                                                <label>
                                                    <input type="radio" @if($user->sex =="w") { checked } @endif name='sex' value='w'>女
                                                </label>
                                            </div>
                                            <div class="radio" style='display:inline-block'>
                                                <label>
                                                    <input type="radio"  @if($user->sex =='x') { checked } @endif name='sex' value='x'>其他
                                                </label>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label>邮箱</label>
                                            <input class="form-control" type='text' name='email' value='{{$user->email}}'>
                                            <p class="help-block">请按要求填写您的邮箱</p>
                                        </div>
                                        <div class="form-group">
                                            <label>手机号</label>
                                            <input class="form-control" type='text' name='tel' value='{{$user->tel}}'>
                                            <p class="help-block">请您填写移动手机号</p>
                                        </div>
                                        <div class="form-group"  >
                                            <label>头像</label>
                                            <input type="file" name='pic'>
                                            <img src="{{$user->pic}}" width='100px'>
                                        </div>
                                        <input type="hidden" name='page' value='{{$page}}'>
                                        <input type="hidden" name='uid' value='{{$user->uid}}'>
                                        {{csrf_field()}}
                                    
                                        
                                        <button class="btn btn-default" type="submit">修改</button>
                                        <button class="btn btn-default" type="reset">重置</button>
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                               
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>     
     
            </div>
          
            <!-- /.row -->
           
            <!-- /.row -->
        </div>
 @endsection